/*
 * @Author: 凌宇king
 * @Date: 2022-09-11 13:54:19
 * @LastEditTime: 2022-09-18 08:04:57
 */

const mongoose = require('mongoose')
//建立用户地址信息表
const addressSchema = new mongoose.Schema({
    openid: { type: String, required: true }, building: String,
    //楼栋
    doorNum: String,
    //门牌号 
    name: String,
    //收件姓名 
    phone: String,
    //收件电话
    isDefault: {
        //默认地址 
        type: Boolean, defalut: false
    },
    addTime: String
    //添加事件
})
//创建地址model对象
const address = mongoose.model('Address', addressSchema, 'address')
module.exports = address 